<?php
define ( 'IN_SEXMALL', true );
require (dirname ( __FILE__ ) . '/includes/init.php');

$host = '10.100.61.250';
if (defined ( 'REDISHOST' )) {
	$host = REDISHOST;
} else {
	echo "NO REDISHOST CONFIG ERROR.";
	die ();
}

$issync = $_REQUEST ["issync"];
if ($issync) {
	include_once "syncdata.php";
}
$redis = new Redis ();
$redis->connect ( $host, 6379 );
$info = $redis->info ();
$syncToken=$redis->get("syncTokenKey");

$needsync = isset ( $info ['db1'] ) || isset ( $info ['db2'] ) || isset ( $info ['db3'] );
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>sexmall - WAP 管理中心 - memcache运行状态</title>
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>

<?php
if($syncToken==1)
{
	echo 'Redis数据同步中.....';
}
elseif($needsync){
	?>

<div>
<form><input name="issync" id="issync" type="hidden" value="true" /> <input
	type="submit" value="同步Redis" /></form>
</div>
	<?php
}
else
{
	echo 'Redis没有数据需要同步!';
}
echo "<br/>";
echo "=========================================================";
var_dump ( $info );
?>
</body>
</html>
